{% extends 'globalPage.html' %}
<title>{% block title %}云学习平台{% endblock %}</title>
{% block body %}
    <nav class="navbar navbar-default" style="margin: 0">
        <div class="container">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <a class="navbar-brand" style="padding: 0;" href="{% url 'home' %}"><img style="height: 50px;"
                                                                                         src="/static/image/logo.png"
                                                                                         alt="Band"></a>
            </div>
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li class="active"><a href="{% url 'home' %}">首页</a></li>
                    <li><a href="{% url 'courses' 'firstGrade' 'allCourses' 1 %}">全部课程</a></li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    {% if user.is_authenticated %}
                        <li><a href="javascript:;" style="margin-top: 5px">你好，{{ user.first_name }}</a></li>
                        <li class="dropdown">
                            <a id="dLabel" data-target="#" href="javascript:;" data-toggle="dropdown"
                               role="button" aria-haspopup="true" aria-expanded="false">
                                <img class="img-circle" src="/static/image/Head.jpg" alt="head"
                                     style="height: 30px;">
                            </a>
                            <ul class="dropdown-menu" aria-labelledby="dLabel">
                                <li><a href="{% url 'personalCenter' %}" style="text-align: center">个人中心</a></li>
                                <li><a href="{% url 'history' %}" style="text-align: center">播放历史</a></li>
                                <li><a href="{% url 'logout' %}" style="text-align: center">退出登陆</a></li>
                            </ul>
                        </li>
                    {% else %}
                        <li><a href="{% url 'login' %}">登陆/注册</a></li>
                    {% endif %}
                </ul>
            </div>
        </div>
    </nav>
    <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
        <!-- Indicators -->
        <ol class="carousel-indicators">
            <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
            <li data-target="#carousel-example-generic" data-slide-to="1"></li>
            <li data-target="#carousel-example-generic" data-slide-to="2"></li>
        </ol>
        <!-- Wrapper for slides -->

        <div class="carousel-inner" role="listbox">
            <div class="item active">
                <img src="/static/image/lbt4.jpg" alt="轮播图">
                <div class="carousel-caption">
                </div>
            </div>
            <div class="item">
                <img src="/static/image/lbt5.jpg" alt="轮播图">
                <div class="carousel-caption">
                </div>
            </div>
            <div class="item">
                <img src="/static/image/lbt6.jpg" alt="轮播图">
                <div class="carousel-caption">
                </div>
            </div>
        </div>
        <!-- Controls -->
        <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
            <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
            <span class="sr-only">Previous</span>
        </a>
        <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
            <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
        </a>
    </div>
    <div class="container">
        <div class="row">
            <div class="col-xs-6 col-md-3">
                <a href="{% url 'courses' 'firstGrade' 'chinese' 1 %}" class="thumbnail">
                    <img src="http://www.aixuetang.com/pic//courseAndGuide/course/2017-07-03/8c48441853724cf5b1df2c13626b1380.jpg" alt="语文">
                </a>
            </div>
            <div class="col-xs-6 col-md-3">
                <a href="{% url 'courses' 'firstGrade' 'english' 1 %}" class="thumbnail">
                    <img src="http://www.aixuetang.com/pic//courseAndGuide/course/2017-07-03/a209efe528b34769819a12132c50d60b.jpg" alt="英语">
                </a>
            </div>
            <div class="col-xs-6 col-md-3">
                <a href="{% url 'courses' 'firstGrade' 'math' 1 %}" class="thumbnail">
                    <img src="http://www.aixuetang.com/pic//courseAndGuide/course/2017-07-03/b947734dc10a4aa98758c1aa9e871bdd.jpg" alt="数学">
                </a>
            </div>
            <div class="col-xs-6 col-md-3">
                <a href="{% url 'courses' 'firstGrade' 'PE' 1 %}" class="thumbnail">
                    <img src="http://www.aixuetang.com/pic//courseAndGuide/course/2017-07-03/c94459d9b15b45e490288a64c7da3baa.jpg" alt="体育">
                </a>
            </div>
            <div class="col-xs-6 col-md-3">
                <a href="{% url 'courses' 'firstGrade' 'art' 1 %}" class="thumbnail">
                    <img src="http://www.aixuetang.com/pic//courseAndGuide/course/2017-07-03/9e76451bf16846668728641b16fc79bb.jpg" alt="美术">
                </a>
            </div>
            <div class="col-xs-6 col-md-3">
                <a href="{% url 'courses' 'firstGrade' 'music' 1 %}" class="thumbnail">
                    <img src="http://www.aixuetang.com/pic//courseAndGuide/course/2017-07-03/9d82cf6180a3497887f35f9f873df36c.jpg" alt="音乐">
                </a>
            </div>
            <div class="col-xs-6 col-md-3">
                <a href="{% url 'courses' 'firstGrade' 'moral' 1 %}" class="thumbnail">
                    <img src="http://www.aixuetang.com/pic//courseAndGuide/course/2017-07-03/c2725e41ba1841b3a3a6f2f72e2853b6.jpg" alt="思想品德">
                </a>
            </div>
            <div class="col-xs-6 col-md-3">
                <a href="{% url 'courses' 'firstGrade' 'science' 1 %}" class="thumbnail">
                    <img src="http://www.aixuetang.com/pic//courseAndGuide/course/2017-10-17/0fdc269bdc1640e0bbe66e2b165757c0.jpg" alt="科学">
                </a>
            </div>
        </div>
    </div>
{% endblock %}